cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(PclDemo)
find_package(PCL 1.2 REQUIRED)

find_package(Boost REQUIRED COMPONENTS thread)
#message("Boost_LIBRARIES = ${Boost_LIBRARIES}")

if (PCL_FOUND)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

# folder
add_subdirectory(tutorials)
add_subdirectory(registration)

# 读取固定格式的文件，写到pcd文件中
add_executable(pcl_WritePcd pcl_WritePcd.cpp)
target_link_libraries(pcl_WritePcd ${PCL_LIBRARIES})


# 点云数据三角面生成和显示
add_executable(pcl_TriangleView pcl_TriangleView.cpp)
target_link_libraries(pcl_TriangleView ${PCL_LIBRARIES} ${Boost_LIBRARIES})

# 点云拼接/配准
add_executable(pcl_icp pcl_icp.cpp)
target_link_libraries(pcl_icp ${PCL_LIBRARIES})

# 拟合平面
add_executable(pcl_PlaneFit pcl_PlaneFit.cpp)
target_link_libraries(pcl_PlaneFit ${PCL_LIBRARIES})

endif () # PCL_FOUND
